#include <bits/stdc++.h>
typedef long long ll;

template<typename T>
void swap(T &a, T &b) {
	T temp;
	temp = a; a = b; b = temp;
}

int main() {
	auto funp_int = swap<int>;
	auto funp_double = swap<double>;
	
	// 这输出了两个不同的地址
	std::cout << (void*)funp_int << std::endl << (void*)funp_double << std::endl;
	
	// 这成功的交换了ab的值
	int a = 1, b = 2;
	(*funp_int)(a, b);
	std::cout << a << std::endl << b << std::endl;
	
	return 0;
}
